import request from "@/utils/request.js"

export default {
	
	// 查询上级
	async getUserLeader(data) {
		return await request({
			url: "/form/Form/leader",
			data: data,
			method: 'POST'
		})
	},
	
	// 查询多个上级
	async getUserLeaders(data) {
		return await request({
			url: "/form/Form/leaders",
			data: data,
			method: 'POST'
		})
	},
	
	// 根据职务查询人员
	async getUsersByRoles(data) {
		return await request({
			url: "/form/Form/getUsersByRoles",
			data: data,
			method: 'POST'
		})
	},
	
	// 根据职务查询本部门人员
	async getDeptUsersByRoles(data) {
		return await request({
			url: "/form/FormGroup/list",
			data: data,
			method: 'POST'
		})
	},
	
	// 查询部门负责人
	async getLeaderByDepts(data) {
		return await request({
			url: "/form/FormGroup/list",
			data: data,
			method: 'POST'
		})
	},
	
	// 新增审批单
	async addForm(data) {
		return await request({
			url: "/form/Form/addForm",
			data: data,
			method: 'POST'
		})
	},
	
	// 查询关联单
	async getBusiness(data) {
		return await request({
			url: "/form/Form/business",
			data: data,
			method: 'POST'
		})
	},
	
	// 新增审批单初始化赋值
	async initData(data) {
		return await request({
			url: "/form/Form/initData",
			data: data,
			method: 'POST'
		})
	},
	
	// 获取分组模型
	async getGroupModels(data) {
		return await request({
			url: "/form/FormGroup/add",
			data: data,
			method: 'POST'
		})
	},

}